<template>
  <view class="my-search-container" :style="{backgroundColor: bgcolor}" @click="sezrchClickHandler">
    <view class="my-search-box" :style="{borderRadius: radius + 'rpx'}">
      <uni-icons type="search" size="18"></uni-icons>
      <text class="my-search-text">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    
    // 自定义样式数据容器
    props: {
      bgcolor: {
        type: String,
        default: '#c00000'
      },
      
      radius: {
        type: Number,
        default: 50
      }
    },
    
    methods: {
      sezrchClickHandler() {
        this.$emit('click')
      }
    },
    
    
  }
</script>

<style lang="scss">
.my-search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  // background-color: #c00000;
  padding: 0 10px;
  .my-search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72rpx;
    width: 100%;
    // border-radius: 18px;
    background-color: #ffffff;
    .my-search-text {
      margin-left: 6px;
    }
  }
}
</style>
